using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class forums_controls_categories_categorypage : Controls.DataManagerForumCategoryControl
{
    protected override void ItemChanged()
    {
        
        if (CurrentForumCategory != null)
        {
            Category1.CurrentForumCategory = CurrentForumCategory;
            Header1.SetItem(CurrentForumCategory);
            mviewCategory.SetActiveView(viewCategory);
            Page.Title = Helpers.StringHelper.SafeFormat(CurrentForumCategory.Name);
        }
        else
        {
            Header1.SetList();
            Header1.SetItem("Category not found");
            Page.Title = "Category not found";
            mviewCategory.SetActiveView(viewError);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            CurrentForumCategory = GetItemFromQueryString();
        }
    }
}
